from enum import Enum, unique



class Stu(object):
    def __init__(self, name, gender):
        self._name = name
        self._gender = gender

    @property
    def gender(self):
        return self._gender

@unique
class Gender(Enum):
    Male = Stu
    Female = object.__class__

# print(dir(Gender))
bart = Stu('Bart', Gender.Male)
print(dir(bart))
Gender.test = lambda a, b: a
print(dir(bart))

print(Gender.Male.name, Gender.Female.name, Gender.Male.value, Gender.Female.value, Gender.__members__, Gender.__members__.items())
if bart.gender == Gender.Male:
    print("test ok")
else:
    print("test fail")
